In rapidly prevailing digital cameras these days, image data obtained by image sensing is subjected to compression by a JPEG (Joint Photographic Coding Experts Group) method, and the compressed image data is stored in a memory card which is an attachable/detachable storage medium.
According to the JPEG method, DPCM (differential pulse-code modulation) is adopted for reversible compression, while DCT (discrete cosine transform) is adopted for irreversible compression. Since the DPCM which is a reversible encoding method does not lose image data, it has excellent image preservability and achieves excellent image quality in a reproduced image. However, compared to the DCT, the DPCM has a lower encoding compression ratio.
On the contrary, in the DCT which is an irreversible encoding method, 8×8-pixel block data is subjected to two-dimensional DCT, then with respect to the coefficient of the transformation non-linear quantization is performed, then AC components are subjected to zigzag scan, and two-dimensional Huffman coding is performed. In the non-linear quantization, fine quantization is performed with respect to a low-frequency component and coarse quantization is performed with respect to a high-frequency component so that image compression can be performed at a high ratio while maintaining reasonable image quality. However, when the image compression ratio is increased, image deterioration (block noise or the like) becomes conspicuous.
Furthermore, in the JPEG method, a uniform quantization table is used for the entire image. Therefore, it is impossible to print a certain area of an image with higher quality than other area of the image. If a user wants to increase the image quality of a particular area of a screen, the user has to increase the quality of the entire image before storage. As a result, the user has no other choice but to reduce the total number of images to be recorded in a memory card.
On the contrary, a so-called JPEG 2000 method is under review as the next-generation compression method. More specifically, image data is broken down to hierarchy data for each of a plurality of resolutions by wavelet transformation or the like, and the broken-down hierarchy data in units of resolution is encoded in order of hierarchy to be compressed and stored as a file (e.g., Japanese Patent Application Laid-Open No. 11-103460). By virtue of the fact that image data is hierarchically encoded, efficient image data transfer is achieved because only the data of necessary resolution can be transferred. Furthermore, an image can be restored without using the encoded data of all the frequency components, but only using the low-resolution data. In other words, the amount of data can easily be reduced by eliminating the high-resolution data.
Furthermore, according to a characteristic aspect of the JPEG 2000, a region of interest (hereinafter referred to as a ROI) is designated in an image, and the image of the ROI can be encoded by a compression coefficient (compression ratio) different from that of the other regions of the image. By employing the compression technique and aspect of the JPEG 2000, it is considered possible to realize a user-friendly digital camera having various functions.
Meanwhile, most of the currently available digital cameras are capable of setting plural levels of recording image quality modes referred to as image sensing modes, e.g., Super Fine (high image quality mode), Fine (medium image quality mode), and Normal (low image quality mode). If the image quality is high, the image size is large. Therefore, selecting image quality means selecting the number of sensing images.
With the current technique, if image data is once sensed and stored in a high image quality mode, it is impossible to lower the image quality of the stored image. In a case where the storage medium inserted in the digital camera runs short of the storage area but there are more objects to be sensed, the image data that has been sensed and stored in the past must be erased, which is problematic to the user.